package com.irdstudio.efp.esb.service.client.impl;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import com.baidu.disconf.client.common.annotations.DisconfItem;
import com.irdstudio.efp.esb.service.client.ESBConfig;

/**
 * @description:默认从application.properties中加载配置信息。
 * 				不可变。
 * @date:2018年12月29日 下午6:00:50
 * @author:hengyh
 */
@Component
public class DefaultESBConfig implements ESBConfig {

	@Value("${esb.client.url}")
	private String url;
	@Value("${esb.client.timeout}")
	private Integer timeout;
	
	@Override
	@DisconfItem(key = "esb.client.url")
	public String getUrl() {
		return url;
	}
	@Override
	@DisconfItem(key = "esb.client.timeout")
	public Integer getTimeout() {
		return timeout;
	}
	
	public void setTimeout(Integer timeout) {
		this.timeout = timeout;
	}
	
	public void setUrl(String url) {
		this.url = url;
	}
}
